@extends('layouts.app')
@section('title', '客户信息')

@section('content')
    <div class="tab">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <table class="table table-hover">
                        <h2 class="text-center">客户资料</h2>
                        <thead>
                        <tr>
                            <th>姓名</th>
                            <th>电话</th>
                            <th>邮箱</th>
                            <th>家庭住址</th>
                            <th>借款金额</th>
                            <th>还款状态</th>

                        </tr>
                        </thead>
                        <tbody>

                        @if($auth == 5)
                            @foreach($filtration as $k)
                                <tr>
                                    <td>{{$k->name}}</td>
                                    <td>{{$k->tel}}</td>

                                    <td>{{ $k->email }}</td>
                                    <td>{{ $k->addr }}</td>
                                    <td>{{ $k->money }}</td>
                                    <td>{{$k->state_desc}}</td>

                                </tr>
                            @endforeach
                        @else
                            @foreach($list as $v)
                                <tr>
                                    <td>{{$v->name}}</td>
                                    <td>{{$v->tel}}</td>

                                    <td>{{ $v->email }}</td>
                                    <td>{{ $v->addr }}</td>
                                    <td>{{ $v->money }}</td>

                                    <td>{{$v->state_desc}}</td>

                                </tr>
                            @endforeach
                        @endif


                        </tbody>

                    </table>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="text-center">
                        @if($auth == 5)
                            {{$filtration->render()}}
                        @else
                            {{$list->render()}}
                        @endif
                    </div>
                </div>
            </div>
        </div>
    </div>
    <link rel="stylesheet" type="text/css"  href="{{ asset('css/customer.css') }}"/>
@endsection
